﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Collections.Generic;
using System.ComponentModel;

namespace MLY.Bll
{
    [DataObject]
    public class workOrderWithName
    {

        public Dal.TableWorkOrder wo;
        public string name;
       

        static Dictionary<int, string> orgNameDict = null;
        string getName(int i)
        {
            return orgNameDict[i];
            //Dal.TableWorkOrder t = new MLY.Dal.TableWorkOrder();
        }

        static void fillDictionary()
        {
            orgNameDict = new Dictionary<int, string>();
            List<Dal.TableOrganization> allOrgs = Bll.clsOrganization.GetAllOrganizations();
            foreach (Dal.TableOrganization t in allOrgs)
                orgNameDict.Add(t.OrganizationId, t.OrganizationName);
        }

    }
}
